home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / asm / asmlib30.zip / INPUT.DOC < prev    next >
Text File  |  1992-06-13  |  22KB  |  612 lines

  1. ********************************  INPUT  ************************************
  2.  
  3. ASMLIB Input subroutines Copyright (C) 1991, 1992 Douglas Herr
  4. all rights reserved
  5.  
  6. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  7.  
  8. A$EDIT:      editor module used by TEdit and GEdit.
  9.              Must be called by GEdit or TEdit
  10. Source:      a$edit.asm (getkey.asm, isdigit.asm, toupper.asm, tolower.asm)
  11.  
  12.              TEdit and GEdit edit a string on a single row of the screen
  13.              (without word wrap).  Strings longer than the column width of
  14.              the screen are scrolled left or right as required.  A public
  15.              byte in A$EDIT's data area, EWIDTH, establishes the effective
  16.              screen width limit.  EWIDTH is a not-to-exceed limit; if the
  17.              actual screen width is less than EWIDTH, EWIDTH is ignored
  18.              and the actual screen width is used instead.  ASMLIB's default
  19.              EWIDTH is 132.
  20.  
  21.              A$EDIT commands for both TEdit and GEdit are:
  22.  
  23.              Ctrl+left arrow = word left
  24.              Ctrl+right arrow = word right
  25.              Ctrl+end = clear to end of string
  26.              Home = go to start of string
  27.              End = go to end of string
  28.  
  29.  
  30.              Option bits, passed to GEdit or TEdit in register AL, are:
  31.  
  32.              Option 1 = upper case input
  33.              Option 2 = lower case input
  34.              Option 1 OR 2 = digits only input
  35.  
  36. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  37.  
  38. CLEARKEY:    clears the keyboard's 'type-ahead' buffer
  39.              Uses BIOS functions to remove all keys in the buffer.
  40. Source:      clearkey.asm
  41.  
  42. Call with:   no parameters
  43. Returns:     nothing
  44. Uses:        nothing
  45. Supports:    standard and enhanced keyboards
  46. Example:     call   clearkey
  47.  
  48.  
  49.  
  50. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  51.  
  52. GEDIT:       string editor for graphics modes
  53.              See also TEdit for text modes, A$EDIT for general information
  54. Source:      gedit.asm (a$edit.asm, gprint.asm, a$graph.asm, gcursor.asm,
  55.                         strspace.asm, heap.asm)
  56.  
  57. Call with:   DS:[SI] pointing to string buffer; may include a default string
  58.              DS:[DX] pointing to x- & y-coordinates
  59.              assumes DS:@data
  60.              CX = byte size of buffer
  61.              AL = option bits (see A$EDIT)
  62.              You must initialize the near heap before calling GEdit.
  63.              GEdit only works with DrawMode 1 or -1 (see DrawMode in
  64.              GRAPHICS.DOC).  GEdit forces drawmode to 1 or -1 and restores
  65.              the previous drawmode on exit.
  66. Returns:     AX = last key pressed (see getkey for key codes)
  67.              CX = new string length
  68. Uses:        AX, CX, flags
  69. Supports:    all ASMLIB graphics modes
  70. Example:
  71.  
  72. .data
  73. x       dw 8                      ; x-coordinate (pixels from left edge)
  74. y       dw 100                    ; y-coordinate (pixels from top of screen)
  75. extrn   ewidth:byte               ; byte in A$EDIT used to limit columns
  76.                                   ; displayed
  77. .code
  78.         .
  79.         .
  80.         .
  81.         mov   ax,@data
  82.         mov   ds,ax
  83.         assume  ds:@data
  84.         mov   ewidth,40           ; there's stuff on the right side of
  85.                                   ; the screen that should be left alone
  86.  
  87.         lea   si,string_buffer    ; near address of string buffer
  88.         mov   cx,len_buffer       ; byte length of buffer for the string
  89.         mov   al,0                ; nothing tricky
  90.         lea   dx,x                ; point to x & y coordinates
  91.                                   ; see GPrint for explanation of x and y
  92.         call  gedit
  93.  
  94.  
  95.  
  96. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  97.  
  98. GETKEY:      returns next key pressed
  99. Source:      getkey.asm
  100.  
  101. Call with:   no parameters
  102. Returns:     AL = ASCII key code
  103.              AH = 0 if normal key
  104.              AH = 1 if extended key code (such as function keys)
  105. Uses:        AX
  106.              Uses BIOS functions; supports enhanced keyboard if present
  107. Supports:    standard and enhanced keyboards
  108. Example:     call  getkey
  109.              shr   ah,1            ; a function key?
  110.              jc    function_key    ; jump if so
  111.  
  112.  
  113. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  114.  
  115. ISALPHA:     determines if a keycode returned by GetKey is a letter from
  116.              A-Z or a-z.
  117. Source:      isalpha.asm
  118.  
  119. Call with:   AX = keycode returned by GetKey.
  120. Returns:     if CF = 0, keycode is a character from A-Z or a-z
  121.              if CF = 1, keycode is not a character from A-Z or a-z
  122.              AX is not changed
  123. Uses:        CF
  124. Example:     call   getkey       ; get next keystroke
  125.              call   isalpha
  126.              jc     not_alpha
  127.  
  128.  
  129.  
  130. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  131.  
  132. ISDIGIT:     determines if a keycode returned by GetKey is the ASCII code
  133.              for the numeric characters 0-9
  134. Source:      isdigit.asm
  135.  
  136. Call with:   AX = keycode returned by GetKey.
  137. Returns:     if CF = 0, keycode is a character from 0-9
  138.              if CF = 1, keycode is not a character from 0-9
  139.              AX is not changed
  140. Uses:        CF
  141. Example:     call   getkey       ; get next keystroke
  142.              call   isdigit      ; I want numbers only
  143.              jc     not_a_number
  144.  
  145.  
  146.  
  147. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  148.  
  149. ISLOWER:     determine if a keycode returned by GetKey is lower case
  150. Source:      islower.asm
  151.  
  152. ISUPPER:     determine if a keycode returned by GetKey is upper case
  153. Source:      isupper.asm
  154.  
  155. Call with:   AX = keycode returned by GetKey.
  156. Returns:     if CF = 0, keycode is a character from A-Z or a-z
  157.              if CF = 1, keycode is not a character from A-Z or a-z
  158.              AX is not changed
  159. Uses:        CF
  160. Example:     call   getkey       ; get next keystroke
  161.              call   isupper      ; is it upper case?
  162.              jc     not_upper    ; no; could be lower case
  163.  
  164.  
  165.  
  166. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  167.              
  168. KEYIFWAITING:Returns first key if one is waiting in the keyboard buffer,
  169.              or returns with no keycode if no keypress is waiting.
  170. Source:      kifwait.asm (getkey.asm)
  171.  
  172. Call with:   no parameters
  173. Returns:     AX = 0 if no key waiting
  174.              AX = keycode if one is waiting in the buffer.  Uses BIOS.
  175. Uses:        AX
  176. Example:     call  keyifwaiting
  177.  
  178.  
  179.  
  180. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  181.  
  182. KEYORBUTTON: waits for first keypress or mouse button click
  183. Source:      mouse.asm (getkey.asm)
  184.  
  185. Call with:   no parameters
  186.              If a keypress is waiting in the keyboard buffer before
  187.              this subroutine is called, the keycode is returned to
  188.              the calling program without checking mouse button status.
  189. Returns:     AX = keycode, BX = mouse button code (see MouseStatus)
  190. Uses:        AX, BX
  191. Supports:    2- or 3-button mouse, standard or enhanced keyboard
  192. Example:     call   keyorbutton
  193.  
  194.  
  195. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  196.  
  197. KEYWAITING:  Determines if a key is waiting in the keyboard buffer.
  198.              Does not remove the key code from the buffer.  Uses BIOS.
  199. Source:      getkey.asm
  200.  
  201. Call with:   no parameters
  202. Returns:     AX = 0 if no key waiting
  203.              AX = 1 if key waiting
  204. Uses:        AX
  205. Supports:    standard or enhanced keyboard
  206. Example:     call   keywaiting
  207.              or     ax,ax        ; has a key been pressed?
  208.              jz     no_key       ; nope, not yet
  209.  
  210.  
  211. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  212.  
  213. MENUOPTION:  define options for PULLDOWN, PICKFILE and PICKSTR
  214. Source:      a$menu.asm
  215.  
  216. Call with:   AX = option value
  217.              BX = option number
  218.  
  219.              If you do not specify any options or if you call MenuOption
  220.              with AX = 0, default values are assumed.
  221.  
  222.              options available are:           defaults:
  223.                0 = normal text color            07h
  224.                1 = current selection color      70h
  225.                2 = submenu box color            0Fh
  226.                3 = hotkey color                 0Fh         (1)
  227.                4 = optional quitkey             no quitkey  (2)
  228.                5 = exit when hotkey pressed     00h         (3)
  229.                6 = box frame type (see WFRAME)  -1
  230.  
  231. (1) the first upper-case letter in each string is that string's hotkey
  232. (2) the quitkey value is a keycode returned by GetKey
  233. (3) use AX = -1 for exit when hotkey pressed, AX = 0 to disable
  234.  
  235. Returns:     nothing
  236. Uses:        nothing
  237. Supports:    PullDown, PickFile and PickStr menu systems
  238. Example:
  239.  
  240. include   asm.inc
  241. extrn     menuoption:proc, pulldown:proc
  242.  
  243. .code
  244.           .
  245.           .
  246.           .
  247.           mov   bx,0         ; text color
  248.           mov   ax,23        ; white w/ blue background
  249.           call  menuoption
  250.  
  251.  
  252.  
  253.  
  254. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  255.  
  256. MOUSELIMIT:  limits mouse's range of motion
  257. Source:      mouse.asm
  258.  
  259. Call with:   DS:[BX] pointing to pixel coordinates of minimum and maximum
  260.              x and y limits.  X-limits are the horizontal dimension and
  261.              y-limits are the vertical dimension.
  262. Returns:     nothing
  263. Uses:        nothing
  264. Example:
  265.  
  266. .data
  267.  
  268. x0    dw 30
  269. y0    dw 15
  270. x1    dw 620
  271. y1    dw 250
  272.  
  273. .code
  274.        .
  275.        .
  276.        .
  277.       mov    ax,@data      ; you don't need to do this stuff after
  278.       mov    ds,ax         ; your startup code unless you've messed with
  279.       assume ds:@data      ; DS somewhere earlier in the program
  280.  
  281.       lea    bx,x          ; DS:[BX] points to limits
  282.       call   mouselimit
  283.  
  284.  
  285.  
  286. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  287.  
  288. MOUSEPOS:    sets the mouse's position
  289. Source:      mouse.asm
  290.  
  291. Call with:   DS:[DX] pointing to desired x- and y-coordinates
  292.              Note that mouse coordinates are expressed as a pixel location
  293.              as with graphics mode, even if the system is in text mode
  294. Returns:     nothing
  295. Uses:        nothing
  296. Example:
  297.  
  298. .data
  299.  
  300. x     dw 100
  301. y     dw 25
  302.  
  303. .code
  304.       .
  305.       .
  306.       .
  307.       mov    ax,@data      ; you don't need to do this stuff after
  308.       mov    ds,ax         ; your startup code unless you've messed with
  309.       assume ds:@data      ; DS somewhere earlier in the program
  310.  
  311.       lea    dx,x          ; DS:[DX] points to desired position
  312.       call   mousepos
  313.  
  314.  
  315. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  316.  
  317. MOUSESTATUS: determine mouse position & buttons pressed
  318. Source:      mouse.asm
  319.  
  320. Call with:   no parameters
  321. Returns:     if ZF = 1, no buttons are pressed
  322.              if ZF = 0, BX = button code
  323.               BX bit 0 if set = left button is down
  324.               BX bit 1 if set = right button is down
  325.               BX bit 2 if set = center button is down
  326.              CX = horizontal (x) coordinate
  327.              DX = vertical (y) coordinate
  328.              Note that mouse positions are expressed as a pixel location
  329.              as with graphics mode, even if the system is in text mode
  330. Uses:        BX, CX, DX, flags
  331. Example:     call  mousestatus
  332.              jz    no_buttons     ; no buttons pressed if ZF = 1
  333.  
  334.  
  335.  
  336. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  337.  
  338. PICKFILE:    pick a file from a list of filenames
  339.              PickFile pops a window on the screen and displays filenames
  340.              matching an input filespec mask.  One filename may be selected
  341.              with cursor keys or with hotkeys.  When Esc, Enter or ^C is
  342.              pressed, PickFile restores the screen and returns the selected
  343.              filename to the calling program.
  344.              Unused memory must be released by STARTUP (see STARTUP.ASM).
  345.              See also MenuOption.
  346. Source:      pickfile.asm ($pick.asm, $listw.asm, m$putw.asm, filelist.asm,
  347.                           dosalloc.asm, wsave.asm, a$menu.asm)
  348.  
  349. Call with:   DS:[SI] pointing to filespec mask
  350.              BX = initial cursor position
  351.              CX = file attribute mask
  352.              DH = top screen row for list
  353.              DL = left screen column for list
  354. Returns:     AX = last key pressed
  355.              ES:[BX] points to filename selected
  356.              CX = maximum length of filename
  357. Uses:        AX, BX, CX, ES
  358. Supports:    text mode
  359. Example:
  360.  
  361. include   asm.inc
  362.  
  363. public    myproc
  364. extrn     pickfile:proc
  365.  
  366. .data
  367. filespec db '*.asm',0            ; search for ASM source code
  368.  
  369. .code
  370. ; program fragment assumes DS:@data
  371.         .
  372.         .
  373.         .
  374.         lea     si,filespec
  375.         mov     bx,0             ; start at top of list
  376.         xor     dx,dx            ; upper left corner of screen
  377.         mov     cx,0             ; normal files only
  378.         call    pickfile
  379.         cmp     ax,0Dh           ; was Enter the last key pressed?
  380.         jne     abort            ;  nope - someone wants out
  381.         call    strndup          ;  yup - copy filename to near heap
  382.         mov     ah,49h
  383.         int     21h              ; release the filename buffer
  384.  
  385.  
  386. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  387.  
  388. PICKSTR:     pick a string from a list of ASCIIZ strings
  389. Source:      pickstr.asm ($pick.asm, $listw.asm, m$putw.asm, $strlist.asm,
  390.                           dosalloc.asm, wsave.asm, a$menu.asm)
  391.  
  392. Call with:   DS:[SI] pointing to list of ASCIIZ strings
  393.              BX = initial cursor position
  394.              DH = top screen row for list
  395.              DL = left screen column for list
  396.  
  397.              PickStr pops a window on the screen and displays the list
  398.              of strings.  One string may be selected with cursor keys
  399.              or with hotkeys.  When Esc, Enter or ^C is pressed, PickStr
  400.              restores the screen and returns a string index number.
  401.              Unused memory must be released by STARTUP (see STARTUP.ASM).
  402.              See also MenuOption.  Maximum number of choices: 255
  403.  
  404. Returns:     AX = last key pressed
  405.              BX = string number selected (first string = 0)
  406. Uses:        AX, BX
  407. Supports:    text mode
  408. Example:
  409.  
  410. include   asm.inc
  411.  
  412. public    myproc
  413. extrn     pickstr:proc
  414.  
  415. .data
  416. string1   db 'January',0
  417.           db 'February',0
  418.           db 'March',0
  419.           db 'April',0
  420.           db 'May',0
  421.           db 'June',0
  422.           db 'July',0
  423.           db 'August',0
  424.           db 'September',0
  425.           db 'October',0
  426.           db 'November',0
  427.           db 'December',0
  428.           db 0              ; mark end of menu strings
  429.  
  430. .code
  431. ; program fragment assumes DS:@data
  432.         .
  433.         .
  434.      lea  si,string1
  435.      mov  bx,1
  436.      xor  dx,dx
  437.      call pickstr
  438.  
  439. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  440.  
  441. PULLDOWN:    pull-down menu system
  442. Source:      pulldown.asm (a$menu.asm, tprint.asm, tprintce.asm, tputchr.asm
  443.                            strlen.asm, wclear.asm, wframe.asm, wsize.asm
  444.                            wsave.asm, getkey.asm, pickstr.asm and others)
  445.  
  446. Call with:   DS:[SI] pointing to menu labels
  447.              BH = initial main menu choice, BL = initial submenu choice
  448.              assumes DS:@data
  449.              Unused memory must be released (see STARTUP.ASM and ENDPROG)
  450.  
  451.              If PullDown is called with BL < 0, only the main headings are
  452.              printed initally; the submenus are printed when ENTER is
  453.              pressed, a mouse button is pressed, or when either the down
  454.              arrow key is pressed or a "down" mouse movement is detected.
  455.  
  456.              If PullDown is called with BL >= 0, it starts in the full main
  457.              headings plus submenus mode.  In this mode, a mouse button
  458.              click or the ENTER key will exit PullDown.  In either mode,
  459.              ESC, ^C or the user-defined quitkey (see MenuOption) causes
  460.              PullDown to return to the calling program.
  461.  
  462.              If there are too many main headings to fit across the top of the
  463.              screen, the headings are scrolled left or right as required to
  464.              show the selected heading.  Use Left, Right, Home and End keys
  465.              to change selected headings.  Maximum number of headings: 20
  466.  
  467.              If there are too many submenu choices under a heading to fit
  468.              on the screen, the selections are scrolled up or down as required
  469.              to show the selected item.  Use Up, Down, PgUp, PgDown keys
  470.              to change selection, or press highlighted letter of selection.
  471.              Maximum number of selections per heading: 255
  472.  
  473. Returns:     BH = main menu choice, BL = submenu choice
  474.              if CF = 1, ^C or Ctrl-Break was pressed
  475.              if CF = 0
  476.                  AX = 13 if ENTER was pressed
  477.                  AX = user-defined quitkey if pressed (see MenuOption)
  478.                  AX = 0 if insufficient DOS memory is available
  479.                  AX = 27 if ESC was pressed
  480.                  AH = 1-7, AL = 0 if mouse button pressed
  481. Uses:        AX, BX
  482. Supports:    text mode; all row/column configurations supported by ASMLIB
  483.              Text subroutines
  484. Example:
  485.  
  486. see next page
  487.  
  488. ;    this sample menu has 4 main menu headings:
  489. ;                          Critters, Things, Food, Trees
  490. ;    submenu choices for each main heading follow each main heading
  491. ;    Note that each string is terminated with NUL, and that there's an
  492. ;    extra NUL between the end of the submenu choices and the next main
  493. ;    heading.
  494. ;    The entire set of menu choices is terminated with 2 NUL bytes
  495. ;
  496. ;    PULLDOWN will return to the calling program when either ESCAPE or
  497. ;    ENTER is pressed (AX = ASCII code of key pressed).  PULLDOWN returns
  498. ;    AX = 0 if insufficient memory is available to save the underlying
  499. ;    screen, or AX = 3 if breaktrap was enabled and Ctrl+Break was pressed.
  500. ;
  501. ;    On return, BH = the main heading and BL = the submenu choice in effect
  502. ;    when the key was pressed.  The first main heading is number 0, and
  503. ;    the first submenu choice for each main heading is also number 0.
  504.  
  505. include asm.inc
  506.  
  507. extrn     pulldown:proc
  508.  
  509. .stack
  510.  
  511. .data
  512. menu db 'Critters',0
  513.      db 'Goats',0,'Chickens',0,'Turkeys',0,'Cows',0,'Snow dogs',0
  514.  
  515.      db 0                   ; separate Things from Critters
  516.      db 'Things',0
  517.      db 'Computers',0,'Tractors',0,'CPU chips',0,'Barbie dolls',0
  518.  
  519.      db 0                   ; separate Food from Things
  520.      db 'Food',0
  521.      db 'Hot dogs',0,'Wheat germ',0,'Lasagne',0,'Cheerios',0
  522.      db 'Potatoes',0,'chocolate chip cooKies',0
  523.  
  524.      db 0                   ; separate Trees from Food
  525.      db 'Trees',0
  526.      db 'giant Sequoia',0,'black Spruce',0,'Willow',0,'live Oak',0
  527.      db 'Acacia',0,'digger Pine',0
  528.  
  529.         db 2 dup(0)            ; end of menu choices
  530.  
  531. .code
  532. ; program fragment assumes DS:@data
  533.         .
  534.         .
  535.         .
  536.         lea   si,menu          ; point to menu labels
  537.         xor   bx,bx            ; initial selection is "goats"
  538.         call  pulldown
  539.  
  540.  
  541. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  542.  
  543. TEDIT:       ASCIIZ string editor for text modes
  544.              See also GEdit for graphics modes, A$EDIT for general information.
  545.              TEdit turns the cursor off (with CursorOFF) on exit.
  546. Source:      tedit.asm (a$edit.asm, cursor.asm, a$clrw.asm, str2vbuf.asm,
  547.                         crtinfo.asm)
  548.  
  549. Call with:   DS:[SI] pointing to string buffer; may include a default string
  550.              assumes DS:@data
  551.              CX = byte size of buffer (excluding terminating NUL)
  552.              AH = color attribute
  553.              AL = option bits (see A$EDIT)
  554.              DH = row (offset from top of screen)
  555.              DL = column (offset from left edge of screen)
  556.  
  557. Returns:     AX = last key pressed (see GetKey for key codes)
  558.              CX = new string length
  559. Uses:        AX, CX, flags
  560. Supports:    text modes; all row/column configurations
  561. Example:     lea   si,string_buffer    ; near address of string buffer
  562.              mov   cx,len_buffer       ; byte length of buffer for the string
  563.              mov   dh,row
  564.              mov   dl,column
  565.              mov   ah,attr             ; color attribute
  566.              mov   al,2                ; force lower case
  567.              call  tedit
  568.  
  569.  
  570.  
  571. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  572.  
  573. TOLOWER:     converts keycode returned by getkey to lower case
  574. Source:      tolower.asm
  575.  
  576. Call with:   AX = keycode
  577. Returns:     AX = lower case keycode
  578.              ToLower leaves the keycode alone if the keycode is not
  579.              upper case A-Z.
  580. Uses:        AX
  581. Example:     call   getkey
  582.              call   tolower
  583.  
  584.  
  585. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  586.  
  587. TOUPPER:     converts keycode returned by getkey to upper case
  588. Source:      toupper.asm
  589.  
  590. Call with:   AX = keycode
  591. Returns:     AX = upper case keycode
  592.              ToUpper leaves the keycode alone if the keycode is not
  593.              lower case a-z.
  594. Uses:        AX
  595. Example:     call   getkey
  596.              call   toupper
  597.  
  598.  
  599. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  600.  
  601. YESNO:       wait for 'Y' or 'N' key to be pressed
  602. Source:      yesno.asm
  603.  
  604. Call with:   no parameters
  605.              Key pressed may be upper or lower case.  Upper case is
  606.              returned.  Uses BIOS functions
  607. Returns:     AX = 'Y' or AX = 'N'
  608. Uses:        AX
  609. Example:     call  yesno
  610.  
  611.  
  612.